<?php
// +----------------------------------------------------------------------
// | SparkERP 优秀的进销存系统 
// +----------------------------------------------------------------------
// | Copyright (c) 2022~2099 http://erp.sparkshop.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai  <1902822973@qq.com>
// +----------------------------------------------------------------------

namespace app\validate\data;

use think\Validate;

class UnitValidate extends Validate
{
    protected $rule = [
        'name|单位名称' => 'require|max:255',
        'is_float|是否允许小数' => 'require|in:1,2',
        'remark|备注' => 'max:255'
    ];

    protected $scene = [
        'add' => ['name', 'is_float', 'remark'],
        'edit' => ['name', 'is_float', 'remark']
    ];
}